<template>
    <Form
          :form-items="formItems"
          :init-data-url="$baseURL.base +  '/base/user/' + $route.params.userId"
    ></Form>
</template>

<script>
    import Form from '../../../../common-util/src/components/page/Form.vue'
    export default {
        components:{
            Form
        },
        data(){
            return {
                formItems:[
                    {
                        field: {
                            name: 'nickname'
                        },
                        element:{
                            label: '昵称',
                            required: true
                        }
                    },
                    {
                        field: {
                            name: 'genderDictId'
                        },
                        element:{
                            label: '性别',
                            type: 'selectDict',
                            selectDict:{
                                groupCode:'gender'
                            },
                            required: true
                        }
                    },
                    {
                        element:{
                            type: 'button',
                            button:[
                                {
                                    action: 'submit',
                                    requestMethod:'put',
                                    url: this.$baseURL.base +  '/base/user/' +this.$route.params.userId,
                                    label: '保存'
                                },
                                {
                                    action: 'reset',
                                    label: '重置',
                                    type: 'default'
                                }
                            ]
                        }
                    }
                ]
            }
        },
        mounted(){
        },
        methods:{
        }
    }
</script>

<style scoped>

</style>